<script setup lang='ts'>
import { reactive, ref } from 'vue';
import { useRouter } from 'vue-router'
import { useRenderIcon } from '@/components/ReIcon/src/hooks';
const base = import.meta.env.BASE_URL
const router = useRouter()
const orgList = reactive([
  {
    logo: base + "44761321.jpg",
    company: '康普尼',
    createAt: '2022-12-31',
    call: '13333333333',
    anchorSize: '200-500'
  },
  {
    logo: base + "52823142.jpg",
    company: '康普',
    createAt: '2022-12-31',
    call: '13333333333',
    anchorSize: '200-500'
  }
])
function jump() {
  router.push({ name: 'cooperation-org-anchors-contracts' })
}


const showAgentAction = ref(false)
function agentAction(row: any) {
  showAgentAction.value = true
}

</script>

<template>

  <ElCard>
    <ElDialog width="400" v-model="showAgentAction">
      <template #title>
        分配/修改[主播名称]经纪人
      </template>
      <ElSelect filterable placeholder="选择或输入搜索">
        <ElOption label="张三" value="1"></ElOption>
      </ElSelect>
      <template #footer>
        <ElButton plain type="primary">解绑经纪人</ElButton>
        <ElButton plain type="warning">添加/修改</ElButton>
      </template>
    </ElDialog>
    <div class="flex items-center justify-between  px-8 ">
      <div>
        <!-- <h3>加入机构</h3> -->
      </div>
      <div>
        <ElInput placeholder="输入机构名称">
          <template #append>
            <ElButton :icon="useRenderIcon('ep:search')"></ElButton>
          </template>
        </ElInput>
      </div>
    </div>
    <ElTable class="mt-4" :data="orgList">
      <ElTableColumn align="center" label="主播昵称"></ElTableColumn>
      <ElTableColumn align="center" label="所属经纪人"></ElTableColumn>
      <ElTableColumn align="center" label="赛季卡比例"></ElTableColumn>
      <ElTableColumn align="center" label="赛事刷新比例"></ElTableColumn>
      <ElTableColumn align="center" label="礼物比例"></ElTableColumn>
      <ElTableColumn align="center" label="合作日期"></ElTableColumn>
      <ElTableColumn align="center" label="合作状态"></ElTableColumn>
      <ElTableColumn align="center" label="操作" width="240">
        <template #="{ row }">
          <ElButton text type="warning" @click="agentAction(row)">修改/分配经纪人</ElButton>
          <ElButton text type="primary" @click="jump">合作协议</ElButton>
        </template>
      </ElTableColumn>
    </ElTable>

  </ElCard>
</template>

<style lang='scss' scoped></style>
